ECHO OFF
IF NOT EXIST %1.FOR GOTO TEST2
GOTO START
:TEST2
IF NOT EXIST %1 GOTO NEXIST
GOTO WRONGENTER
:START
C:\FTNDIR\FOR1 %1,,,;
IF ERRORLEVEL 1 GOTO END
C:\FTNDIR\PAS2
IF ERRORLEVEL 1 GOTO END
C:\FTNDIR\PAS3
IF ERRORLEVEL 1 GOTO END
ERASE %1.COD
ERASE %1.MAP
GOTO END
:NEXIST
ECHO File %1.FOR does not exist.
GOTO END
:WRONGENTER
ECHO Please enter the filename to compile less the ".FOR" suffix.
ECHO "EXAMPLE.FOR" should be entered as "C:COMPILE EXAMPLE".
:END
